package com.jwell.panprovider.model

import com.jwell.driverapp.tools.BaseSubscriber
import com.jwell.panprovider.application.App
import com.jwell.panprovider.contract.WaybillContract
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers

/**
 * Created by 76577 on 2018/4/24.
 * 供应详情-运单列表
 */
class WaybillModel : WaybillContract.Model, BaseModel() {
    override fun getListData(request: RequestData, baseSubscriber: BaseSubscriber) {
        if (App.DEBUG) println("供应详情-运单列表")
        getApiStore().getPlanDetailWaybillPage(request)
                .subscribeOn(Schedulers.io())
                .unsubscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(baseSubscriber)
    }


    data class RequestData(
            var planId: Int? = null,
            var maxResultCount: Int? = null,
            var skipCount: Int? = null,
            var filter: String? = null,
            var billState: Int? = null,
            var stateDate: String? = null,
            var endDate: String? = null)
}